<template>
	<view>
		<view class="item-content">
			<homeMovieScorll :movieItem='item' v-for="item in moviesArr" :key='item._id' />
		</view>
	</view>
</template>

<script>
	export default {
		name:"homeItem",
		props:['tag'],
		data() {
			return {
				moviesArr:[]
			};
		},
		methods:{
			getMovies() {
				this.$api.movies.getMovies({tag:this.tag}).then(({
					result
				}) => {
					this.moviesArr = result;
					// console.log(result);
				})
			}
		},
		created() {
			this.getMovies();
		}
	}
</script>

<style lang="scss">
.item-content {
			display: flex;
		}
</style>
